package com.wkbb.common.dto.basic;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.utils.DoubleUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 组织信息表
 * b_organization
 *
 * @author Lxc
 * @date 2019-07-01 13:57:32
 */
@Data
public class OrganizationStatisticalDto implements Serializable {
    @ApiModelProperty(value = "学生人数")
    private int studentNum;
    @ApiModelProperty(value = "兴趣课数量")
    private int courseNum;
    @ApiModelProperty(value = "托管课数量")
    private int trusteeshipNum;
    @ApiModelProperty(value = "报名人数")
    private int signUpNum;
    @ApiModelProperty(value = "小程序绑定人数")
    private int appletNum;
    @ApiModelProperty(value = "订单金额(分)")
    private int totalAmout;
    @ApiModelProperty(value = "退款金额(分)")
    private int refundAmount;
    @ApiModelProperty(value = "报名率(百分比)")
    private String enrollmentRate;

    public String getEnrollmentRate() {
        if (studentNum == 0) return "0%";
        return DoubleUtil.ratios((double)signUpNum,(double)studentNum);
    }
}